<%@ page contentType="text/html;charset=UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="lib/html5shiv.js"></script>
    <script type="text/javascript" src="lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin"/>
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css"/>
    <!--[if IE 6]>
    <script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>操作员维护</title>
</head>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 系统设置 <span class="c-gray en">&gt;</span> 操作员密码修改
</nav>
<div class="page-container">
    <div class="cl pd-5 bg-1 bk-gray">
        <span class="r" style="padding-top: 6px;">共有数据：<strong id="count">${map.get("db2")[0].VALUE01}</strong> 条</span>
    </div>
    <table style="table-layout:fixed; width: 100%; word-break:break-all;" class="table table-border table-bordered table-bg table-hover table-sort table-responsive" id="tablelist">
        <span class="l" style="padding-top: 6px;">操作员列表</span>
        <thead>
        <tr class="text-c">
            <th style="width: 45px">流水号</th>
            <th style="width: 60px">操作员号</th>
            <th style="width: 160px">负责人</th>
            <th style="width: 140px">联系电话</th>
            <th style="width: 140px">所属角色</th>
            <th >所属部门</th>
            <th style="width: 60px">当前状态</th>
            <th style="width: 100px">操作</th>
        </tr>
        </thead>
        <tbody id="datalist">
        </tbody>
    </table>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">

    var ii_count = parseInt($("#count").text());

    $(document).ajaxComplete(function(event, xhr, settings) {
        //从http头信息取出 在filter定义的sessionstatus，判断是否是 timeout
        if(xhr.getResponseHeader("sessionstatus")==="timeout"){
            //从http头信息取出登录的url ＝ loginPath
            if(xhr.getResponseHeader("loginPath")){
                window.location.replace(xhr.getResponseHeader("loginPath"));
            }
        }
    });

    $(document).ready(function(){
        f_getinfo();
    });

    function f_getinfo() {

        var ls_opid = "${sessionOpid}";
        $.ajax({
            type: 'post',
            url:'com',
            data:{
                URL:'',
                CMD:'ZI',
                VALUE01:ls_opid
            },
            async: false,
            success: function (data) {
                var jsonobj = JSON.parse(data);

                ii_count = jsonobj.db2[0].VALUE01;
                $("#count").text(ii_count);

                var c_table = $("#datalist");
                c_table.html("");
                var str = "";
                var json1 = jsonobj.db1;
                for(var key in json1){
                    str += "<tr class='text-c'>" +
                        "<td>" + json1[key].VALUE01.toString() + "</td>" +
                        "<td>" + json1[key].VALUE02.toString() + "</td>" +
                        "<td>" + json1[key].VALUE03.toString() + "</td>" +
                        "<td>" + json1[key].VALUE04.toString() + "</td>" +
                        "<td>" + json1[key].VALUE05.toString() + "</td>" +
                        "<td>" + json1[key].VALUE06.toString() + "</td>" +
                        "<td class='td-status'><span class='label label-success radius'>" + json1[key].VALUE07.toString() + "</span></td>" +
                        "<td class='td-manage'>" +
                        "    <a title=\"密码修改\" onclick=\"admin_set('密码修改',this,'800','500')\" class=\"ml-5\" style=\"text-decoration:none\"><i class=\"Hui-iconfont\">&#xe63f;</i></a>" +
                        "</td>" +
                        "</tr>";
                }
                c_table.html(str);
            },
            error: function (XmlHttpRequest, textStatus, errorThrown) {
                layer.msg('网络异常错误', {icon: 1, time: 1000});
            }
        })
    }

    /*编辑*/
    function admin_set(title, obj, w, h) {
        if (title == null || title === '') {            title = false;        }
        if (w == null || w === '') {            w = 800;        }
        if (h == null || h === '') {            h = ($(window).height() - 50);        }

        var ls_opid = "${sessionOpid}";

        layer.open({
            type: 2,
            area: [w + 'px', h + 'px'],
            fix: false, //不固定
            maxmin: false,
            shade: 0.4,
            title: title,
            content: 'com?URL=w_chgpass_edit.jsp&CMD=ZI&value01=' + $(obj).parent().parent().find('td').eq(1).text()
        });
    }

</script>
</body>
</html>
